﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

// 用于随机生成Prefab

public class PrefabRandomGenerator : MonoBehaviour
{
    public GameObject prefab;
    public uint number;
    public float height;

    // Start is called before the first frame update
    void Start()
    {
        for(int idx = 0; idx < number; idx ++)
        {
            Instantiate(
                prefab, new Vector3(Random.Range(-100.0f, 100.0f), height, Random.Range(-100.0f, 100.0f)),
                Quaternion.Euler(new Vector3(90, 0, 0))
                );
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
